module tests.comp.Issue296 where

data RType = DeadEnd | WinningCycle | LosingCycle

derive Show RType

exampleGood :: (RType, ())
exampleGood = (l w', ()) where
  l true = WinningCycle
  l false = LosingCycle
  w' = if true then false else true

exampleBad :: (RType, ())
exampleBad = (if w' then LosingCycle else WinningCycle, ()) where
  w' = if true then false else true

main = println exampleBad